package com.java.tutorials.po;

/**
 * Created by xuzhike on 2016/2/13.
 */
public class UserInfo {
    private String id;
    private String name;
    private int age;
    private boolean man = true;
    private double height;
    private Address address;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean isMan() {
        return man;
    }

    public void setMan(boolean man) {
        this.man = man;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public static UserInfo create(String name, String id){
        UserInfo userInfo = new UserInfo();
        userInfo.setName(name);
        userInfo.setId(name+"_id="+id);
        userInfo.setAge(40);
        userInfo.setHeight(171.2);
        userInfo.setMan(true);
        Address address = new Address();
        address.setHouseNo("HouseNo.10293");
        address.setCity("Zhuhai");
        address.setCountry("China");
        address.setPhoneNum("15018321352");
        address.setStreet("Guangdong zhuhai huafa 115 402");
        userInfo.setAddress(address);
        return userInfo;
    }
}
